home *** CD-ROM | disk | FTP | other *** search
/ Turnbull China Bikeride / Turnbull China Bikeride - Disc 1.iso / ARGONET / PD / PROGRAMMING / DESKLIBC / SOURCES.ZIP / DeskLib / !DLSources / Libraries / TextFile / c / SkipBlanks < prev   
Text File  |  1995-07-08  |  980b  |  32 lines

  1. /*
  2.     ####             #    #     # #
  3.     #   #            #    #       #          The FreeWare C library for 
  4.     #   #  ##   ###  #  # #     # ###             RISC OS machines
  5.     #   # #  # #     # #  #     # #  #   ___________________________________
  6.     #   # ####  ###  ##   #     # #  #                                      
  7.     #   # #        # # #  #     # #  #    Please refer to the accompanying
  8.     ####   ### ####  #  # ##### # ###    documentation for conditions of use
  9.     ________________________________________________________________________
  10.  
  11.     File:    TextFile.SkipBlanks.c
  12.     Author:  Copyright © 1992 Jason Williams
  13.     Version: 1.00 (07 Apr 1992)
  14.     Purpose: Generic textfile-handling routines
  15. */
  16.  
  17.  
  18. #include <stdio.h>
  19.  
  20. #include "DeskLib:Core.h"
  21. #include "DeskLib:TextFile.h"
  22.  
  23.  
  24. extern void TextFile_SkipBlanks(FILE *infile)
  25. {
  26.   char ch = 9;
  27.  
  28.   while (!feof(infile) && (ch == 32 || ch == 9 || ch == '\n'))
  29.     ch = getc(infile);
  30.   ungetc(ch, infile);
  31. }
  32.